<template>
  <div v-if="content" class="container-width">
    <div class="custom-picture mar-b-10 mar-t-23">
      <el-image
        v-for="(item, index) in content.guideList"
        :key="index"
        class="image"
        :src="item.imgUrl"
        lazy
        @click="handleJumpPage(item)"
      />
    </div>
  </div>
</template>

<script lang="ts">
  import {
    defineComponent,
    onMounted
  } from 'vue'
  import {
    useRouter
  } from 'vue-router'
  import {
    jumpPage
  } from '@/utils/jumpPageUtils'
  export default defineComponent({
    name: 'CustomPictureFirst',
    props: {
      content: {
        type: Object,
        default: () => ({})
        // type: Array,
        // default: () => []
      }
    },
    setup() {
      const router = useRouter()
      onMounted(() => {})
      const handleJumpPage = (item: any) => {
        jumpPage(router, item.hasLink, item.linkTarget, item.linkType, item.linkParams, item.newPage)
      }
      return {
        handleJumpPage
      }
    }
  })
</script>

<style lang="scss" scoped>
  $darkBlue: #182245;

  .custom-picture {
    ::v-deep(.image) {
      display: block;
      width: 100%;
      height: 100%;
    }
  }
</style>
